Learn R Programming

EdSurvey (version 1.0.6)

[.light.edsurvey.data.frame: Subset the rows of a light.edsurvey.data.frame.

Description

Return a new light.edsurvey.data.frame which, when passed to getData, returns only a subset of the data.

Usage

# S3 method for light.edsurvey.data.frame
[(x, i, ...)

Arguments

x

a light.edsurvey.data.frame.

i

not used. Included only for compatability.

...

not used. Included only for compatability.

Value

An object of the same class as x, with the same attributes, that has been subsetted.

Examples

Run this code
# NOT RUN {
# read in the example data (generated, not real student data)
sdf <- readNAEP(system.file("extdata/data", "M36NT2PM.dat", package = "NAEPprimer"))
gddat <- getData(sdf, c("composite", "dsex"), addAttributes = TRUE)
table(gddat[gddat$dsex=="Male","dsex"])

# }

Run the code above in your browser using DataLab